<?php

namespace App\Http\Controllers\Laravel\Storage;

use App\BCAM\CMVariable\CMVariable;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Storage;
class FunController extends Controller
{
    //D:\web\Front\storage
    //D:\web\Front\app
    //D:\web\Front
    //"D:\web\Front\config"
    //"D:\web\Front\database"
    //"D:\web\Front\public"
    /**
     * laravel 的所有路径函数
     */
    public function storagePath(){
        CMVariable::compareRes(
            storage_path(),//返回storage目录的绝对路径
            app_path(),//返回app目录的绝对路径
            base_path(),//项目根目录的绝对路径
            config_path(),//应用配置目录的绝对路径
            database_path(),//应用数据库目录的绝对路径
            public_path()//返回public目录的绝对路径
        );
    }

    public function allFiles(){
        dd(Storage::allFiles(),Storage::files());
    }

    public function basename(){
        $pathSuffix = "/app/hello.php";
        $path = "/app/hello";
        dump(
            basename($pathSuffix),
            basename($pathSuffix,'.php'),
            basename($path)
        );
    }



}
